﻿<phone:PhoneApplicationPage 
    x:Class="PNut_Project_Lin.Insurance"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <StackPanel x:Name="LayoutRoot">
        <StackPanel.Background>
            <ImageBrush Stretch="Fill" ImageSource="/picture/jan-31-dark road.jpg" Opacity="0.5"/>
        </StackPanel.Background>


        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel  Margin="12,17,0,28">
            <TextBlock FontSize="60" FontFamily="/PNut_Project_Lin;component/Fonts/Fonts.zip#TH Sarabun New" Text="ค้นหาอู่ประกันภัยรถยนต์"  Style="{StaticResource PhoneTextTitle1Style}" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <ListBox x:Name="InsuranceListBox"  Height="505"  ItemsSource="{Binding}" SelectionChanged="InsuranceListBox_SelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
                        <Image Margin="30,0,0,0"  Width="120" Source="{Binding img}" />
                        <TextBlock Margin="15,0,0,0" Text="{Binding Name}" FontFamily="/PNut_Project_Lin;component/Fonts/Fonts.zip#TH Sarabun New" FontSize="36" VerticalAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <StackPanel x:Name="stbt" Orientation="Horizontal" HorizontalAlignment="Center">

            <Button x:Name="web_bt" Width="150" Click="web_bt_Click">
                <Viewbox RenderTransformOrigin="0.5,0.5">
                    <Viewbox.RenderTransform>
                        <TransformGroup>
                            <CompositeTransform Rotation="0" ScaleX="0.525" ScaleY="0.525" />
                        </TransformGroup>
                    </Viewbox.RenderTransform>
                    <Path Width="30.7699" Height="23.9222" Stretch="Uniform" Fill="White" Data="F1 M 6.14438,3.05176e-005L 0,3.05176e-005L 0,6.18002L 6.14438,6.18002L 6.14438,3.05176e-005 Z M 6.14438,9.12003L 0,9.12003L 0,15.3L 6.14438,15.3L 6.14438,9.12003 Z M 6.14438,17.7778L 0,17.7778L 0,23.9222L 6.14438,23.9222L 6.14438,17.7778 Z M 30.7699,1.96503L 10.2726,1.96503L 10.2726,5.17502L 30.7699,5.17502L 30.7699,1.96503 Z M 30.7699,11.085L 10.2726,11.085L 10.2726,14.295L 30.7699,14.295L 30.7699,11.085 Z M 30.7699,19.245L 10.2726,19.245L 10.2726,22.455L 30.7699,22.455L 30.7699,19.245 Z "/>
                </Viewbox>
            </Button>
            <Button x:Name="tel_bt" Width="150" Click="tel_bt_Click">
                <Viewbox RenderTransformOrigin="0.5,0.5">
                    <Viewbox.RenderTransform>
                        <TransformGroup>
                            <CompositeTransform Rotation="0" ScaleX="0.525" ScaleY="0.525" />
                        </TransformGroup>
                    </Viewbox.RenderTransform>
                    <Path Width="18.0251" Height="17.9974" Stretch="UniformToFill" UseLayoutRounding="False" Fill="White" Data="F1 M 0.292511,15.8775C 0.0825195,15.5875 -0.0149841,15.365 0,15.21C 0.0150146,15.055 0.0300293,14.8325 0.0449829,14.5425C 0.0599976,14.2525 0.173737,13.9788 0.386261,13.7213C 0.598755,13.4637 0.88501,13.195 1.245,12.915C 1.85001,12.43 2.37625,12.0862 2.82376,11.8837C 3.27127,11.6813 3.67752,11.65 4.04251,11.79C 4.4075,11.93 4.66873,12.0625 4.82623,12.1875C 4.98376,12.3125 5.27249,12.6025 5.6925,13.0575C 6.36749,13.7275 7.91998,12.8325 10.35,10.3725C 12.78,7.91248 13.6725,6.36249 13.0275,5.72247C 12.2625,4.95251 11.835,4.3725 11.745,3.98248C 11.62,3.3125 12.0025,2.40002 12.8925,1.245C 13.1725,0.88501 13.4525,0.595032 13.7325,0.375C 14.0125,0.154968 14.2862,0.0374756 14.5537,0.022522C 14.8213,0.00750732 15.045,0 15.225,0C 15.405,0 15.6313,0.0974731 15.9038,0.29248C 16.1762,0.487488 16.3587,0.623718 16.4513,0.701233C 16.5437,0.778748 16.735,0.969971 17.025,1.27502C 17.315,1.58002 17.475,1.75 17.505,1.78497C 18.24,2.51501 18.1938,3.96625 17.3662,6.13873C 16.5388,8.31122 15.0038,10.5187 12.7613,12.7612C 10.5187,15.0037 8.3075,16.535 6.1275,17.355C 3.94751,18.175 2.49002,18.21 1.755,17.46L 1.28998,17.04C 0.975006,16.725 0.782501,16.525 0.712524,16.44C 0.642487,16.355 0.502502,16.1675 0.292511,15.8775 Z "/>
                </Viewbox>
            </Button>
        </StackPanel>
    </StackPanel>

    
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
